
// ChildView.h : interface of the CChildView class
//


#pragma once

#include "graphics/OpenGLWnd.h"
#include "graphics/GrCamera.h"
#include "GameManager.h"
#include "Helicopter.h"
#include "Particles.h"

// CChildView window

class CChildView : public COpenGLWnd
{
protected: //contents
	CGrCamera	_camera;
	CGameManager *_game;
	CHelicopter _heli;
	double _angle;
	int _score;

	bool _renderGame;
	// Construction
public:
	CChildView();

// Overrides
	protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
public:
	virtual ~CChildView();

	// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void OnGLDraw(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	void DrawAxis();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	void BaseCheck();
	afx_msg void OnTimer(UINT_PTR nIDEvent);

	void CALLBACK TimerFire(HWND hwnd, UINT msg, UINT TID, DWORD dwTime);
	private:
    CParticles m_particles;

    bool        m_run;
    bool        m_firstdraw;
    DWORD       m_lasttime;



public:
	afx_msg void OnFileRendergame();
	afx_msg void OnUpdateFileRendergame(CCmdUI *pCmdUI);
};

